package com.flysheep.dao;

import com.flysheep.dao.base.BaseDAO;
import com.flysheep.domain.Board;

import java.util.Iterator;

/**
 * Created by FlySheep on 2016/11/28.
 */
public class BoardDAO extends BaseDAO<Board> {
    protected final String GET_BOARD_NUM = "select count(f.boardId) from Board f";

    public long getBoardNum() {
        Iterator iter = getHibernateTemplate().iterate(GET_BOARD_NUM);
        return ((Long) iter.next());
    }
}
